<script type="text/javascript">
	selectTab('about_contest');
</script>

<?php
if(!empty($this->contest->id)):
	/* @var $contest Core_Model_Contest */
	$contest = $this->contest;
?>

	<div class="social_plugin" style="height: 22px;padding-left: 10px;padding-top: 4px;">
		<?php echo $this->social->render('shareUrl',
			array(
				'url'		=> $this->social->getShareUrl('/contest/share/contest/id_page/'.$this->social->getIdPage().'/id_contest/'.$this->contest->id),
				'send'		=> false, 
                'width'		=> 'auto',
                'layout'	=> 'full'
			))
		?>
	</div>

	<div class="contest_detail" style="clear:both;">
		<?php echo $contest->description; ?>
		<?php echo $contest->template_prize; ?>
	</div>

	<div class="social_plugin" style="height: 22px;padding-left: 10px;padding-top: 4px;">
		<?php echo $this->social->render('shareUrl',
			array(
				'url'		=> $this->social->getShareUrl('/contest/share/contest/id_page/'.$this->social->getIdPage().'/id_contest/'.$this->contest->id),
				'send'		=> false, 
                'width'		=> 'auto',
                'layout'	=> 'full'
			))
		?>
	</div>
<?php endif;?>

<div style="padding-left: 10px;padding-top:5px;">
	<a class="fanpage_button" href="<?php echo $this->pageUrl(array('target' => 'view'), true); ?>">
		<?php echo $this->translate('MENU_VIEW_ENTRIES')?>
	</a>
</div>

<div style="clear:both">&nbsp;</div>

<script type="text/javascript">
    $(document).ready(function(){
        var url = '<?php echo $this->baseUrl('/contest/index/notify')?>';
        var data = {
            url: "<?php echo $this->social->getShareUrl('/contest/share/contest/id_page/'.$this->social->getIdPage().'/id_contest/'.$this->contest->id); ?>",
            id_contest: "<?php echo $this->contest->id?>"
        };
        detectNewComment(url, data, function(){});
    });
</script>